package ec.com.avila.hiperion.comun;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

@Entity
@NamedQueries({
		// Catalogo
		@NamedQuery(name = "Catalogo.findById", query = "SELECT c FROM Catalogo c WHERE c.idCatalogo =:idCatalogo"),
		@NamedQuery(name = "Catalogo.findAll", query = "SELECT c FROM Catalogo c ORDER BY c.idCatalogo"),
		// DetalleCatalogo
		@NamedQuery(name = "DetalleCatalogo.findAll", query = "SELECT d FROM DetalleCatalogo d ORDER BY d.idDetallecatalogo"),
		@NamedQuery(name = "DetalleCatalogo.findByCodCatalogo", query = "SELECT d FROM DetalleCatalogo d WHERE d.catalogo.idCatalogo =:idCatalogo"),
		@NamedQuery(name = "DetalleCatalogo.findByCodDepCatalogo", query = "SELECT d FROM DetalleCatalogo d WHERE d.codDepCatalogo =:codDepCatalogo AND d.codDepDetallecatalogo =:codDepDetCalogo"),
		// Persona
		@NamedQuery(name = "Persona.findAll", query = "SELECT p FROM Persona p ORDER BY p.idPersona"),
		// Cliente
		@NamedQuery(name = "Cliente.findAll", query = "SELECT c FROM Cliente c ORDER BY c.idCliente"),
		// Usuario
		@NamedQuery(name = "Usuario.findAll", query = "SELECT u FROM Usuario u ORDER BY u.idUsuario"),
		@NamedQuery(name = "Usuario.findByNombre", query = "SELECT u FROM Usuario u WHERE u.nombreUsuario =:nombreUsuario") })
public class Consultas implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	private Integer comunId;

	/**
	 * 
	 * @return
	 */
	public Integer getComunId() {
		return comunId;
	}

	/**
	 * 
	 * @param comunId
	 */
	public void setComunId(Integer comunId) {
		this.comunId = comunId;
	}

}
